/*
 * @lc app=leetcode id=231 lang=cpp
 *
 * [231] Power of Two
 */
class Solution {
public:
    bool isPowerOfTwo(int n) {
        if (n < 1) {
            return false;
        }

        return (n & (n-1)) == 0;
        
    }
};

